package models

import "gorm.io/gorm"

type ActivityType string

const (
	Practice ActivityType = "practice"
	Exam     ActivityType = "exam"
)

type Activity struct {
	gorm.Model
	UserID    uint         `gorm:"not null"`
	Type      ActivityType `gorm:"not null"`
	Questions []Question   `gorm:"many2many:activity_questions;"`
	WrongSet  []WrongSet   `gorm:"foreignKey:UserID"`
}

type WrongSet struct {
	gorm.Model
	UserID     uint `gorm:"not null"`
	QuestionID uint `gorm:"not null"`
	Keep       bool `gorm:"default:true"`
}
